#pragma once

#include "topdbs_common.hpp"
#include "topdbs_base_connection.hpp"
#include "topdbs_base_session.hpp"

namespace topdbs
{
	class topdbs_factory
	{
	public:
		virtual ~topdbs_factory() = default;
		virtual topdbs_base_connection* CreateConnection() = 0;
		virtual topdbs_base_session*    CreateSession(topdbs_base_connection* pConnection) = 0;
	};

	class topdbs_connection_factory
	{
		topdbs_factory* m_pFactory;
	public:
		topdbs_connection_factory(eDBSClient_t dbsClient);
		~topdbs_connection_factory();
		topdbs_base_connection* create();
	};

	class topdbs_session_factory
	{
		topdbs_factory* m_pFactory;
	public:    
		topdbs_session_factory(eDBSClient_t dbsClient);
		~topdbs_session_factory();
		topdbs_base_session* create(topdbs_base_connection* pConnection);
	};
}


